<?php
class Session
{
    private static $_sessionStarted = false;
    
    public static function start()
    {
        if (self::$_sessionStarted == false)
        {
            session_start();
            self::$_sessionStarted = true;
        }
    }
    public static function get($key){
        if(isset($_SESSION["$key"])){
            return $_SESSION["$key"];
        }
    }
    public static function set($key, $value){
        $_SESSION["$key"]=$value;
    }
    public static function destroy(){
        if (self::$_sessionStarted == true)
        {
            self::$_sessionStarted = false;
            session_unset();
            session_destroy();
        }
    }
    
    public static function display($key){
		if (isset($_SESSION["$key"])) {
			echo $_SESSION["$key"];    
		}
	}
}
?>